Electronic device and method for controlling an electronic device

ABSTRACT

An electronic device is provided. The electronic device comprises at least one master network interface (MNI) with in a credit count unit (CC) for counting received credits and a first buffer unit (FIFO). The electronic device furthermore comprises at least one slave network interface (SNI) which comprises a threshold unit (TU) and at least one second buffer unit (FIFO). The electronic device furthermore comprises an interconnect (N) for coupling the at least one master network interface (MNI) and the at least one slave network interface (SNI). The slave network interface (SNI) is adapted to send a number of credits via the interconnect (N) to the master network interface (MNI) if the available amount of space or credits in the at least one second FIFO buffer (FIFO) reaches a threshold value stored in the threshold unit (TU). The slave network interface (SNI) is adapted to send the available credits via the interconnect (N) to the master network interface (MNI) if a predetermined time interval has lapsed or if an event from an external event generator is received even if the number of credits is below the threshold value stored in the threshold unit (TU).

FIELD OF THE INVENTION

The present invention relates to an electronic device and to a methodfor controlling an electronic device.

BACKGROUND OF THE INVENTION

Systems-on-chip SoC have become more and more popular in recent years.The components of the systems-on-chip SoC can be connected via aninterconnect, e.g. like a network. During the communication in asystem-on-chip SoC via an interconnect, care must be taken to avoiddeadlocks.

In “Avoiding Message-Dependent Deadlock in Network-Based Systems onChip” by Hansson et al., VLSI Design, Volume 2007, Hindawi PublishingCorporation, a link level flow control is described to preventmessage-dependent deadlocks. FIG. 1 shows a block diagram of a part of asystem-on-chip according to such prior art. Here, a master networkinterface MNI, a network N and a slave network interface SNI isdepicted. The master network interface MNI comprises among others acredit count unit CC and a FIFO memory FIFO. The slave network interfaceSNI comprises a delta credit count unit DCC, a threshold unit TU and aFIFO memory FIFO. Data packets dp are transmitted from the masternetwork interface MNI via the network N to the slave network interfaceSNI. Credit packets cp are transmitted from the slave network interfaceSNI to the master network interface MNI via the network. The masternetwork interface MNI receives data for example from a IP module (notshown). The master network interface MNI furthermore receives requestsreq from the IP module and outputs acknowledgements ack to the IP module(this is performed by the FIFO memory FIFO). The credit count unit CCreceives the credit packets cp from the slave network interface SNI viathe network N. The slave network interface SNI receives the data packetsdp from the master network interface SNI via the network N. The slavenetwork interface SNI also receives requests from an IP module (notshown) coupled to the slave network interface SNI. The request req mayindicate n-values. The slave network interface SNI may output anacknowledgement ack indicating n-values to the IP module. Furthermore,the slave network interface SNI may output data to the IP module.

The link level flow control is implemented by the slave networkinterface which sends packets with credits (i.e. credit packets cp) tothe master network interface MNI if data is consumed by the slavenetwork interface, i.e. if data has been forwarded to the IP module bythe slave network interface SNI. The information in the credit packetscp indicate that space is available in the FIFO buffer in the slavenetwork interface. The master network interface MNI is designed to onlythen send new packets to the slave network interface SNI if one or morecredits have arrived in the credit packets from the slave networkinterface SNI. However, credit packets cp with credit information needto be sent from the slave network interface SNI to the master networkinterface MNI, i.e. via the network N. Therefore, a significant amountof network bandwidth of the network N may be required for the creditpackets cp to implement the required link level flow control. Thenetwork bandwidth of the network N can be used up to 40% fortransmitting the credit packets. Therefore, the slave network interfaceSNI can be adapted to only forward a credit packet cp if a minimumnumber of credits, i.e. space in the FIFO buffer, is available. Onlythen, the credit packet cp is sent from the slave network interface SNIto the master network interface MNI to indicate that a number of packetscan be forwarded to the slave network interface SNI. In particular, anumber can be stored and transmitted via the credit packet cp toindicate the amount of additional credits or amount of additional spacein the FIFO buffer.

However, it should be noted that using this kind of threshold fortransmitting the credits may cause deadlocks in the network. A deadlockcan be detected at design time if the number of data words beingconsumed by a task does not depend on the input data values of the task.Here, it cannot be assured that a system is free from deadlocks. Inother words, it cannot be guaranteed as data consuming tasks may requestmore data than available in the FIFOs of the slave network interfaces.To avoid this, all data of a task could be made available before a taskcan start. Accordingly, a deadlock can be detected at design time.Furthermore, it can be prevented that a processing unit cannot perform atask switch due to the fact that it has issued a data load operationresulting in a processor stall as the data is not present in the FIFO.If the number of data words requested by a task is smaller than thecapacity of the FIFO of the slave network interface SNI, it can berealized that all the data of a task is available before the task canstart. On the other hand, a FIFO in a network interface cannot be filledwith the data if the credits in the network interface are below theavailable threshold and are therefore not returned to the master networkinterface MNI.

SUMMARY OF THE INVENTION

It is an object of the invention to provide an electronic device with animproved deadlock capability.

This object is solved by an electronic device according to claim 1 and amethod according to claim 6.

Therefore, an electronic device is provided. The electronic devicecomprises at least one master network interface with a credit count unitfor counting received credits and a first buffer unit. The electronicdevice furthermore comprises at least one slave network interface whichcomprises a threshold unit and at least one second buffer unit. Theelectronic device furthermore comprises an interconnect for coupling theat least one master network interface and the at least one slave networkinterface. The slave network interface is adapted to send a number ofcredits via the interconnect to the master network interface if theavailable amount of space or credits in the at least one second FIFObuffer reaches a threshold value stored in the threshold unit. The slavenetwork interface is adapted to send the available credits via theinterconnect to the master network interface if a predetermined timeinterval has lapsed or if an event from an external event generator isreceived even if the number of credits is below the threshold valuestored in the threshold unit.

Accordingly, by means of the timer unit, a deadlock in the communicationdue to the fact that first a specific number of credits must beavailable before the credits are forwarded to the master networkinterface can be avoided.

According to an aspect of the invention, the at least one timer unit isprovided for each buffer unit in the slave network interface.Accordingly, a deadlock can be prevented for each of the buffer units.

According to a further aspect of the invention, the timer unit comprisesat least one register for storing the predefined time intervals.

According to a further aspect of the invention the slave networkinterface comprises a delta credit count unit for determining the numberof packets being outputted from the at least one second buffer unit andfor forwarding this information to the threshold unit such that theavailable amount of credits is stored in the delta credit count unit.

According to an aspect of the invention the at least one slave networkinterface comprises a timer unit for counting to the predetermined timeinterval.

The invention also relates to a method for controlling an electronicdevice. The electronic device comprises at least one master networkinterface with a credit count unit for counting received credits and afirst buffer unit, at least one slave network interface having athreshold unit and at least one second buffer unit and an interconnectfor coupling the master network interface and the at least one slavenetwork interface. A number of credits is sent from the slave networkinterface via the interconnect to the master network interface if anavailable amount of credits in the at least one second buffer unitreaches a threshold value. The available credits are sent from the slavenetwork interface to the master network interface if a predeterminedtime interval has lapsed or if an event from an external event generatoris received.

The invention relates to the idea that a timer is added in a slavenetwork interface. Even if the credits are below the threshold of thethreshold unit, all credits are returned in a packet after apredetermined time interval.

Further aspects of the invention are described in the dependent claims.

BRIEF DESCRIPTION OF THE DRAWINGS

Advantages and embodiments of the invention are now described in moredetail with reference to the Figures.

FIG. 1 shows a block diagram of a system-on-chip according to the priorart, and

FIG. 2 shows a block diagram of an electronic device according to afirst embodiment.

DETAILED DESCRIPTION OF EMBODIMENTS

FIG. 2 shows a block diagram of an electronic device according to afirst embodiment. The electronic device according to the firstembodiment can be implemented as or can comprise a system-on-chip SoC.The system-on-chip SoC may comprise an interconnect N which can beimplemented as a network N. A master network interface MNI and at leastone slave network interface SNI are coupled to the interconnect N. Thenetwork interfaces may be used to couple IP modules to the interconnect.The IP modules can be a processing unit, a memory, dedicated processingunits like video graphic units, etc. The network interfaces serve as aninterface between the IP modules and the interconnect. Accordingly, theIP modules do not need to be re-designed as the network interfaces willtake care of the interconnect-related communication protocol. Theelectronic device according to FIG. 2 basically corresponds to theelectronic device according to FIG. 1. The slave network interfacecomprises a threshold unit TU, a delta credit count unit DCC and a FIFObuffer. If a number of packets has been forwarded from the FIFO memoryin the slave network interface SNI to the IP module connected to theslave network interface SNI, the delta credit count unit DCC willdetermine this amount and will forward the information to the thresholdunit TU. If the threshold of the threshold unit TU has been reached, therespective credit information is forwarded in the credit packets cp viathe network N to the master network interface MNI. Then, the masternetwork interface MNI can send a corresponding amount of data packets dpto the slave network interface SNI.

The timer unit T will start to count and after a predefined timeinterval it will initiate that all credits are sent via the creditpackets cp to the master network interface MNI even if the credit counthas not yet reached the threshold value in the threshold unit TU.Accordingly, a deadlock can be avoided. Alternatively or in addition, anevent from an external event generator can be received to initiate thatall credits are sent via the credit packets to the master networkinterface MNI.

According to a second embodiment which can be based on the firstembodiment, one timer unit T can be provided in each network interfacefor all the FIFO buffers of the network interface. If the predefinedtime interval as stored in the timer unit has lapsed after the timerunit has been activated, all available credits in the FIFO buffers arereturned to the master network interface MNI. Accordingly, deadlocks dueto the threshold values can be avoided. It should be noted that the useof one timer unit T in a slave network interface SNI will make itdifficult to differentiate the maximum release time for each FIFObuffer. Accordingly, the analysis of the minimum guaranteed throughputwill be less accurate. Furthermore, more credit packets will beforwarded to the master network interface than actually required.

It should be noted that the above-mentioned embodiments illustraterather than limit the invention, and that those skilled in the art willbe able to design many alternative embodiments without departing fromthe scope of the appended claims. In the claims, any reference signsplaced between parentheses shall not be construed as limiting the claim.The word “comprising” does not exclude the presence of elements or stepsother than those listed in a claim. The word “a” or “an” preceding anelement does not exclude the presence of a plurality of such elements.In the device claim enumerating several means, several of these meanscan be embodied by one and the same item of hardware. The mere fact thatcertain measures are recited in mutually different dependent claims doesnot indicate that a combination of these measures cannot be used toadvantage.

Furthermore, any reference signs in the claims shall not be constrainedas limiting the scope of the claims.

1. Electronic device, comprising: at least one master network interfacehaving a credit count unit for counting received credits and a firstbuffer unit, at least one slave network interface having a thresholdunit and at least one second buffer unit, and an interconnect forcoupling the master network interface and the at least one slave networkinterface, wherein the slave network interface is adapted to send anumber of credits via the interconnect to the master network interfaceif an available amount of credits in the at least one second buffer unitreaches a threshold value stored in the threshold unit, wherein theslave network interface is adapted to send the available credits via theinterconnect to the master network interface if a predetermined timeinterval has lapsed or if an event from an external event generator isreceived, even if the number of credits is below the threshold valuestored in the threshold unit.
 2. Electronic device according to claim 1,wherein at least one timer unit is provided for each second buffer unitin the slave network interface.
 3. Electronic device according to claim2, wherein the timer unit comprises at least one register for storingthe predefined time interval.
 4. Electronic device according to claim 1,wherein the slave network interface comprises a delta credit count unitfor determining a number of packets being outputted from the at leastone second buffer unit and for forwarding this information to thethreshold unit such that the available amount of credits is stored inthe delta credit count unit.
 5. Electronic device according to claim 1,wherein the at least one slave network interface comprises a timer unitfor counting to the predetermined time interval.
 6. Method forcontrolling an electronic device having at least one master networkinterface having a credit count unit for counting received credits and afirst buffer unit, at least one slave network interface having athreshold unit and at least one second buffer unit, comprising the stepsof: coupling the master network interface and the at least one slavenetwork interface, sending a number of credits from the slave networkinterface to the master network interface if an available amount ofcredits in the at least one second buffer unit reaches a thresholdvalue, and sending the available credits from the slave networkinterface to the master network interface if a predetermined timeinterval has lapsed or if an external event from an external eventgenerator is received even if the number of credits is below thethreshold value.